home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / var / db / pkg / net-wireless / ipw3945-1.0.3 / ipw3945-1.0.3.ebuild < prev    next >
Text File  |  2006-05-11  |  3KB  |  90 lines

  1. # Copyright 1999-2006 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/net-wireless/ipw3945/ipw3945-1.0.3.ebuild,v 1.1 2006/05/05 15:22:43 brix Exp $
  4.  
  5. inherit linux-mod
  6.  
  7. # The following works with both pre-releases and releases
  8. MY_P=${P/_/-}
  9. S=${WORKDIR}/${MY_P}
  10.  
  11. IEEE80211_VERSION="1.1.13"
  12. UCODE_VERSION="1.13"
  13. DAEMON_VERSION="1.7.18"
  14.  
  15. DESCRIPTION="Driver for the Intel PRO/Wireless 3945ABG miniPCI express adapter"
  16. HOMEPAGE="http://ipw3945.sourceforge.net/"
  17. SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
  18.  
  19. LICENSE="GPL-2"
  20. SLOT="0"
  21. KEYWORDS="~x86"
  22.  
  23. IUSE="debug"
  24. DEPEND=">=net-wireless/ieee80211-${IEEE80211_VERSION}
  25.         sys-apps/sed"
  26. RDEPEND=">=net-wireless/ieee80211-${IEEE80211_VERSION}
  27.         >=net-wireless/ipw3945-ucode-${UCODE_VERSION}
  28.         >=net-wireless/ipw3945d-${DAEMON_VERSION}"
  29.  
  30. BUILD_TARGETS="all"
  31. MODULE_NAMES="ipw3945(net/wireless:)"
  32. MODULESD_IPW3945_DOCS="README.ipw3945"
  33.  
  34. CONFIG_CHECK="NET_RADIO FW_LOADER !IPW3945"
  35. ERROR_NET_RADIO="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO)."
  36. ERROR_FW_LOADER="${P} requires Hotplug firmware loading support (CONFIG_FW_LOADER)."
  37. ERROR_IPW3945="${P} requires the in-kernel version of the IPW3945 driver to be disabled (CONFIG_IPW3945)"
  38.  
  39. pkg_setup() {
  40.     linux-mod_pkg_setup
  41.  
  42.     if kernel_is 2 4; then
  43.         die "${P} does not support building against kernel 2.4.x"
  44.     fi
  45.  
  46.     if [[ ! -f ${ROOT}/lib/modules/${KV_FULL}/net/ieee80211/ieee80211.${KV_OBJ} ]]; then
  47.         eerror
  48.         eerror "Looks like you forgot to remerge net-wireless/ieee80211 after"
  49.         eerror "upgrading your kernel."
  50.         eerror
  51.         eerror "Hint: use sys-kernel/module-rebuild for keeping track of which"
  52.         eerror "modules needs to be remerged after a kernel upgrade."
  53.         eerror
  54.         die "${ROOT}/lib/modules/${KV_FULL}/net/ieee80211/ieee80211.${KV_OBJ} not found"
  55.     fi
  56.  
  57.     BUILD_PARAMS="KSRC=${KV_DIR} KSRC_OUTPUT=${KV_OUT_DIR} IEEE80211_INC=/usr/include"
  58. }
  59.  
  60. src_unpack() {
  61.     local debug="n"
  62.  
  63.     unpack ${A}
  64.  
  65.     sed -i \
  66.         -e "s:^#\(CONFIG_IPW3945_QOS\)=.*:\1=y:" \
  67.         -e "s:^# \(CONFIG_IPW3945_MONITOR\)=.*:\1=y:" \
  68.         -e "s:^# \(CONFIG_IEEE80211_RADIOTAP\)=.*:\1=y:" \
  69.         -e "s:^# \(CONFIG_IPW3945_PROMISCUOUS\)=.*:\1=y:" \
  70.         ${S}/Makefile || die
  71.  
  72.     use debug && debug="y"
  73.     sed -i -e "s:^\(CONFIG_IPW3945_DEBUG\)=.*:\1=${debug}:" ${S}/Makefile || die
  74. }
  75.  
  76. src_compile() {
  77.     linux-mod_src_compile
  78.  
  79.     einfo
  80.     einfo "You may safely ignore any warnings from above compilation about"
  81.     einfo "undefined references to the ieee80211 subsystem."
  82.     einfo
  83. }
  84.  
  85. src_install() {
  86.     linux-mod_src_install
  87.  
  88.     dodoc CHANGES ISSUES
  89. }
  90.